#!/bin/bash

# 				    更换ubuntu为国内阿里源					  #
# 			   试用于ubuntu18.04 其他版本未验证				  #
###############################################################
# 备份
cp /etc/apt/sources.list /etc/apt/sources.list.back
# 删除原始文件
rm -rf /etc/apt/sources.list
# 获得远程sources.list文件
curl -o /etc/apt/sources.list  https://gitee.com/zglong/init-devops/raw/master/ubuntu/sources/sources.list
# 刷新列表
sudo apt-get update
sudo apt-get upgrade